//
//  LGStatusRetweetView.swift
//  LGWeibo
//
//  Created by 李更 on 8/14/16.
//  Copyright © 2016 itcast. All rights reserved.
//

import UIKit

class LGStatusRetweetView: UIView {
    
    //定义一个Viewmodel供外界调用
    var StatusViewModel : LGStatusViewModel?{
        didSet{
            
            retweetLable.text = StatusViewModel?.statusModel?.retweeted_status?.text
            
            
        }
    }
    
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI(){
        backgroundColor = RandomColor()
        //添加控件
        addSubview(retweetLable)
        
        
        //添加约束
        retweetLable.snp_makeConstraints { (make) in
            make.leading.top.equalTo(10)
        }
        self.snp_makeConstraints { (make) in
            make.bottom.equalTo(retweetLable).offset(10)
        }
        
        
        
    }
    
    
    

    private var retweetLable : UILabel = UILabel(textColor: UIColor.darkGrayColor(), textSize: 15, maxWidth: SCREENW - 20)
}
